<?php
/**
* 
*/
class MenuModel extends MY_Model
{
	
	public function __construct()
	{
		parent::__construct();
		$this->table = 'nmp_home_menu';
	}


	//获取列表数据
	public function get_list_data()
	{
		$this->db->select('*');
		$this->db->from($this->table);
		$query = $this->db->get();

		return $query->result_array();

	}


	//
	public function get_menu_row($menu_id)
	{
		$this->db->select('*');
		$this->db->from($this->table);
		$this->db->where('id', $menu_id);
		$query = $this->db->get();

		return $query->row_array();

	}


	//更新数据
	public function updata_data($arr, $menu_id)
	{
		if ($this->db->update($this->table,$arr,array('id'=>$menu_id))){			
			return true;
		}else{
			return false;
		}
	}



}




?>